package com.yunyao.framework.service;

import com.yunyao.common.dto.excel.SettlementExcelDto;
import com.yunyao.common.dto.project.HistoryQtDto;
import com.yunyao.common.dto.project.ProjectSettlementDto;
import com.yunyao.common.dto.project.ProjectSettlementMaterialDto;
import com.yunyao.common.dto.project.ProjectSettlementOrderDto;
import com.yunyao.common.web.util.PageResult;
import com.yunyao.common.web.util.YResult;
import com.yunyao.framework.dto.project.ProjectSettlementApprovalDto;
import com.yunyao.framework.dto.project.ProjectSettlementCheckDto;
import com.yunyao.framework.dto.project.ProjectSettlementConfirmDto;
import com.yunyao.framework.dto.project.ProjectSettlementDeletedDto;
import com.yunyao.framework.dto.project.ProjectSettlementSaveDto;
import com.yunyao.framework.dto.project.ProjectSettlementSubmitApprovalDto;
import com.yunyao.framework.dto.reconciliation.ReconciliationMaterialDto;
import com.yunyao.framework.vo.project.ProjectSettlementInfoVO;
import com.yunyao.framework.vo.project.ProjectSettlementMaterialVO;
import com.yunyao.framework.vo.project.ProjectSettlementOrderVO;
import com.yunyao.framework.vo.project.ProjectSettlementVO;
import com.yunyao.framework.vo.reconciliation.ReconciliationMaterialVO;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author xingjishuai
 * @date 2024-07-22
 */
@Validated
public interface ProjectSettlementService {
    /**
     * 分页查询项目结算列表
     * @param projectSettlementDto
     * @return
     */
    YResult<PageResult<ProjectSettlementVO>> pageList(ProjectSettlementDto projectSettlementDto);

    /**
     * 根据id查询项目结算材料列表
     * @param
     * @return
     */
    YResult<PageResult<ProjectSettlementMaterialVO>> materialPageList(ProjectSettlementMaterialDto projectSettlementMaterialDto);


    YResult<PageResult<ReconciliationMaterialVO>> getReconciliationMaterialListbySupplyId(ReconciliationMaterialDto reconciliationMaterialDto);
    /**
     * 根据id查询项目结算信息
     * @param settlementDto
     * @return
     */
    YResult<ProjectSettlementInfoVO> getInfo(ProjectSettlementDto settlementDto);

    /**
     * 项目结算确认
     *
     * @param projectSettlementConfirmDto
     * @return
     */
    YResult<String> confirm(ProjectSettlementConfirmDto projectSettlementConfirmDto);

    /**
     * 项目结算对账订单分页列表
     *
     * @param projectSettlementOrderDto
     * @return
     */
    YResult<PageResult<ProjectSettlementOrderVO>> orderPageList(ProjectSettlementOrderDto projectSettlementOrderDto);

    /**
     * 项目结算保存
     *
     * @param projectSettlementSaveDto
     * @return
     */
    YResult<String> save(ProjectSettlementSaveDto projectSettlementSaveDto);

    /**
     * 项目结算核对
     * @param projectSettlementCheckDto
     * @return
     */
    YResult<String> check(ProjectSettlementCheckDto projectSettlementCheckDto);

    /**
     * 提交审核
     * @param submitApprovalDto
     * @return
     */
    YResult<String> submitApproval(ProjectSettlementSubmitApprovalDto submitApprovalDto);

    /**
     * 审批
     * @param approvalDto
     * @return
     */
    YResult<String> approval(ProjectSettlementApprovalDto approvalDto);

    /**
     * 删除项目结算
     * @param projectSettlementDeletedDto
     * @return
     */
    YResult<String> deleted(ProjectSettlementDeletedDto projectSettlementDeletedDto);

    /**
     * 云采确认
     * @param projectSettlementConfirmDto
     * @return
     */
    YResult<String> ycConfirm(ProjectSettlementConfirmDto projectSettlementConfirmDto);

    YResult<Map<String, Object>> materialCount(ProjectSettlementMaterialDto projectSettlementMaterialDto);

    List<SettlementExcelDto> export(ProjectSettlementDto projectSettlementDto);

    /**
     * 获取结算历史金额
     * @param dto
     * @return
     */
    BigDecimal getSupplyTaxTotalPrice(HistoryQtDto dto);
}
